﻿	
	CREATE TABLE SUNRISE_TEST.ACC_BASE_DATA
	     (
	      ASOF_DATE DATE,
	      REGION CHAR(12) CHECK(REGION  IN ('SOUTHEAST   ','L13         ')),
	      MARKET CHAR(4) CHECK(MARKET IN ('ALM ','FL  ','GA  ','KTNS')),
	      TRAC_ID CHAR(10) NOT NULL PRIMARY KEY,
	      PROGRAM CHAR(5) CHECK(PROGRAM IN ('APT  ','CONDO','SFU  ')),
	      NATIONAL_IND CHAR(1) CHECK(NATIONAL_IND IN ('N','Y')),
	      PORTFOLIO VARCHAR(100),
	      PROPERTY_NM VARCHAR(100),
	      AREA_MGR VARCHAR(50),
	      SALES_ENG VARCHAR(50),
	      ACCT_MGR VARCHAR(50),
	      STRATEGY_IND CHAR(1) CHECK(STRATEGY_IND IN ('S','V')),
	      HAS_ADDRS CHAR(1) DEFAULT 'N' CHECK(HAS_ADDRS IN('N','Y'))
		  );


	CREATE TABLE SUNRISE_TEST.ACC_TRAC_ID_SUMMARY
	     (
	      STATE_CD CHAR(2) CHECK(STATE_CD IN ('AL','FL','GA','KY','LA','MS','NC','SC','TN')),
	      TRAC_ID CHAR(10) NOT NULL PRIMARY KEY,
	      TRAC_NUM INTEGER,
	      ACCT_MGR CHAR(25) CHECK( ACCT_MGR IN ('ADAMS, JOYA              ','AM AL VACANT             ','AM FL VACANT             ','AM GA VACANT             ','AM KY VACANT             ','AM LA VACANT             ','AM MS VACANT             ','AM SC VACANT             ','ASHLEY, DONNA            ','BARNES, JENNY            ','COLLINS, SHERRI          ','CROZIER, GREG            ','DUKES, SHARON            ','GOENS, AL                ','HAWKS, SCOTT             ','HOPPER, TIFFANY          ','JACKSON, TERESA          ','KATZ, STEVE              ','KEE, LEANDER             ','LESLEY, SHERRY           ','LIDY, TRACY              ','MARALDO, ED              ','MARTINEZ, LEONTE         ','MORRIS, BARRY            ','MORRIS, LENNY            ','NAMIE, LESLEY            ','ROGERS, PAIGE            ','SIPLIN, DANNY            ','SPICER, CARRIE           ','STALNAKER, DEBORAH       ','STEED, DAWN              ','THOMAS, GLENN            ')),
	      AREA_MGR CHAR(25) CHECK( AREA_MGR IN ('AMY MARTIN               ','CATHY MARINO             ','INTERNAL AREA MGR        ','MICHAEL BOBKO            ','ROGER THARRINGTON        ')),
	      PORTFOLIO_NM VARCHAR(100),
	      PROPERTY_NM VARCHAR(100),
	      ADDRESSES INTEGER CHECK( ADDRESSES IN (100 ,120 )),
	      GREENS INTEGER,
	      SUBSCRIBERS INTEGER CHECK( SUBSCRIBERS IN (0 ,1 ,2 )),
	      HSIA INTEGER CHECK(HSIA IN (0 ,1 ,2 )),
	      IPTV INTEGER CHECK (IPTV IN (0 ,1 ,2 )),
	      VOIP INTEGER,
	      HSIA_REVENUE DECIMAL(7,2),
	      IPTV_REVENUE DECIMAL(7,2),
	      VOIP_REVENUE DECIMAL(7,2),
	      OTHER_UVERSE_REVENUE DECIMAL(7,2),
	      TOTAL_REVENUE DECIMAL(7,2))
	;

